App: Document static classes and common patterns in services - #1663
Merged
Conversation
✅ Deploy Preview for moodledevdocs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Moodle App development guide to better document the purpose of core/static classes and to describe common, recommended service structuring patterns (layering, WS access separation, and consistent *WSService method signatures).
Changes:
- Clarifies
core/singletonsand adds a newcore/staticsection describing intended usage of static utility classes. - Updates the “Singletons” section to focus on “Service Singletons”.
- Adds a new “Services” section describing common layering patterns and a recommended WS service signature convention.
Comments suppressed due to low confidence (2)
general/app/development/development-guide.md:349
- This section removes the definition of "Pure Singletons" but still references them ("In contrast with pure singletons"), which makes the documentation internally inconsistent. Reword to avoid referencing a term that is no longer defined, and fix singular/plural for "Service Singleton(s)".
The application relies heavily on the [Singleton design pattern](https://en.wikipedia.org/wiki/Singleton_pattern). Right now the app only uses the singleton pattern for Angular Services, what we call "Service Singleton".
### Service Singletons {/* #service-singletons */}
Service singletons are instances resolved from the [root application injector](https://angular.io/guide/hierarchical-dependency-injection). In contrast with pure singletons, these are defined as Angular services. In particular, these should be [singleton services](https://angular.io/guide/singleton-services).
general/app/development/development-guide.md:413
- Grammar: "generated in offline in the app" reads incorrectly; it should be "generated offline in the app".
- An optional sync service to handle sending data generated in offline in the app back to the server (for example, `MyFeatureSyncService`).
crazyserver
approved these changes
Jul 29, 2026
crazyserver
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.